import React, { PureComponent } from 'react'
import PropTypes from 'prop-types'
import ResponsiveImage from '@/components/ResponsiveImage'
import css from './postMusic.module.scss'
export default class SpacePostMusic extends PureComponent {
    static propTypes = {
        id: PropTypes.oneOfType([
            PropTypes.number,
            PropTypes.string
        ]),
        title: PropTypes.string,
        cover: PropTypes.string,
        view: PropTypes.number
    }

    state = {
        size: '@180w_180h_1c'
    }

    render() {
        const { title, cover, view } = this.props
        const { size } = this.state
        return (
            <div className={css["wrap"]}>
                <div className="box">
                    <div className="cover">
                        <ResponsiveImage className="img" src={cover} size={size} />
                    </div>
                    <div className="content">
                        <div className="title">{ title }</div>
                        <p className="desc">{ view }收听</p>
                    </div>
                </div>
            </div>
        )
    }
}
